# 常量类
class Constant:
    ADDRESS_REQUEST_URL = "https://h5.ele.me/restapi/bgs/poi/search_poi_nearby_alipay"
    RESTAURANT_REQUEST_URL = "https://h5.ele.me/restapi/shopping/v3/restaurants"

    headers = {
        'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
    }
    DRIVER_PATH = r"C:\Program Files (x86)\Microsoft\Edge\Application\MicrosoftWebDriver.exe"

    @staticmethod
    def get_restaurant_detail_url(restaurant_id):
        return "https://h5.ele.me/pizza/shopping/restaurants/{0}/batch_shop".format(restaurant_id)

    @staticmethod
    def get_batch_comment_url(restaurant_id):
        return "https://h5.ele.me/pizza/ugc/restaurants/{0}/batch_comments".format(restaurant_id)

    @staticmethod
    def get_rating_url(restaurant_id):
        return "https://h5.ele.me/restapi/ugc/v3/restaurants/{0}/ratings".format(restaurant_id)
